package com.gome.ocean.service.websql;

import java.util.List;
import java.util.Map;
import java.util.Set;

import com.gome.ocean.common.enums.DataBaseType;
import com.gome.ocean.common.enums.DataSource;
import com.gome.ocean.common.exception.CommonDataBaseException;
import com.gome.ocean.dao.model.dsm.CommonDataBase;
import com.gome.ocean.dao.model.dsm.CommonDataBaseDetail;

public interface CommonDataSourceService {

    /**
     * 获取所有的数据源 包含DSM，DATAX
     * 
     * @return
     */
    Map<DataSource, Set<CommonDataBase>> getAllDataSource(List<String> projectNames) throws CommonDataBaseException;

    CommonDataBaseDetail findDataBase(Long dataBaseId, Long dataSourceId, DataSource dataSource,
                                      DataBaseType dataBaseType) throws CommonDataBaseException;

    List<CommonDataBase> getDataBaseListsByHttp(List<CommonDataBase> list, String email, String ip,
                                                String envType) throws CommonDataBaseException;;

    CommonDataBaseDetail getSingleDataBaseByHttp(Long dataSourceId, DataBaseType dataBaseType, String email, String ip,
                                                 String envType) throws CommonDataBaseException;;

}
